/* 添加CSS样式以适配标签功能 */

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f5f5f5;
  min-width: 1200px;
}

.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
  width: 220px;
  height: 100%;
  background: linear-gradient(180deg, #5f70f4 0%, #6ec1e4 100%);
  color: #fff;
  transition: width 0.3s;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: 60px;
}

.logo-area {
  height: 60px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  position: relative;
}

.logo-tag {
  position: absolute;
  top: -5px;
  right: -15px;
  background-color: #f0ad4e;
  color: #000;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
}

.nav-menu {
  padding: 10px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
  margin-bottom: 5px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-icon {
  margin-right: 10px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.collapse-btn {
  position: absolute;
  bottom: 20px;
  left: 190px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #fff;
  color: #5f70f4;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: left 0.3s;
}

.collapsed .collapse-btn {
  left: 35px;
}

/* 内容区域样式 */
.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* 标签栏样式 */
.tabs-container {
  display: flex;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 5px 5px 0;
  overflow-x: auto;
  white-space: nowrap;
}

.tabs button {
  padding: 5px 10px;
  background-color: #FFF;
  border: 1px solid #CCC;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #eee;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-right: 2px;
  cursor: pointer;
  position: relative;
}

.tab-item.active {
  background-color: #fff;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
}

.close-tab {
  margin-left: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background-color: #ccc;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.close-tab:hover {
  background-color: #ff4d4f;
}

/* 面包屑样式 */
.breadcrumb-container {
  padding: 10px 20px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
}

.breadcrumb-item {
  color: #1890ff;
  text-decoration: none;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #888;
}

.user-info {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.last-login {
  color: #888;
  margin-right: 15px;
}

.user-avatar {
  background-color: #1890ff;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
}

/* 主内容区域样式 */
.main-content {
  flex: 1;
  padding: 20px;
  background-color: #fff;
  overflow-y: auto;
}

/* 页面通用样式 */
.page-container {
  padding: 10px;
}

.page-container h1 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}

/* 操作栏统一对齐和间距 */
.actions-bar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  margin-right: 15px;
  margin-bottom: 10px;
}

.search-box input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-right: none;
  outline: none;
  border-radius: 4px 0 0 4px;
}

.search-box button {
  padding: 8px 12px;
  background-color: #1890ff;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
}

.filter-group {
  display: flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 10px;
}

.filter-group label {
  margin-right: 5px;
  color: #666;
}

.filter-group select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

.btn {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn-primary {
  background-color: #1890ff;
  color: #fff;
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.btn-edit {
  background-color: #13c2c2;
  color: #fff;
}

.btn-delete {
  background-color: #ff4d4f;
  color: #fff;
}

.btn-view {
  background-color: #722ed1;
  color: #fff;
}

.btn-process {
  background-color: #faad14;
  color: #fff;
}

.btn-success {
  background-color: #52c41a;
  color: #fff;
}

.btn-reset {
  background-color: #fa8c16;
  color: #fff;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  min-height: 200px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
}

.data-table th {
  background-color: #fafafa;
  font-weight: bold;
  color: #333;
}

.data-table tr:hover {
  background-color: #f5f5f5;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-badge.active,
.status-badge.success {
  background-color: #e6f7ff;
  color: #1890ff;
}

.status-badge.inactive,
.status-badge.danger {
  background-color: #fff1f0;
  color: #ff4d4f;
}

.status-badge.warning {
  background-color: #fffbe6;
  color: #faad14;
}

.status-badge.info {
  background-color: #e6fffb;
  color: #13c2c2;
}

/* 表单样式 */
.form-container {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #e8e8e8;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 厨房订单卡片样式 */
.kitchen-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kitchen-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.stat-card {
  flex: 1;
  min-width: 200px;
  background-color: #fff;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin-top: 5px;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.order-card {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.order-card.preparing {
  border-left: 4px solid #faad14;
}

.order-card.ready {
  border-left: 4px solid #1890ff;
}

.order-card.completed {
  border-left: 4px solid #52c41a;
}

.order-header {
  background-color: #fafafa;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
}

.order-items {
  padding: 15px;
}

.order-items ul {
  list-style-type: none;
  padding-left: 0;
}

.order-items li {
  padding: 5px 0;
  border-bottom: 1px dashed #e8e8e8;
}

.order-footer {
  background-color: #fafafa;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e8e8e8;
}

.order-status {
  font-weight: bold;
}

.completed-label {
  color: #52c41a;
  font-weight: bold;
}

/* 财务样式 */
.finance-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-cards {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.summary-card {
  flex: 1;
  min-width: 200px;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.summary-card.income {
  background-color: #f6ffed;
  border-left: 4px solid #52c41a;
}

.summary-card.expense {
  background-color: #fff1f0;
  border-left: 4px solid #ff4d4f;
}

.summary-card.profit {
  background-color: #e6f7ff;
  border-left: 4px solid #1890ff;
}

.summary-card.pending {
  background-color: #fffbe6;
  border-left: 4px solid #faad14;
}

.amount {
  font-size: 24px;
  font-weight: bold;
  margin-top: 5px;
}

.transaction-type {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.transaction-type.income {
  background-color: #f6ffed;
  color: #52c41a;
}

.transaction-type.expense {
  background-color: #fff1f0;
  color: #ff4d4f;
}

.date-range {
  display: flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 10px;
}

.date-range label {
  margin-right: 5px;
  color: #666;
}

.date-range input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  margin-right: 5px;
}

.priority-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.priority-badge.high {
  background-color: #fff1f0;
  color: #ff4d4f;
}

.priority-badge.medium {
  background-color: #fffbe6;
  color: #faad14;
}

.priority-badge.low {
  background-color: #f6ffed;
  color: #52c41a;
}

/* 系统管理样式 */
.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.panel h2 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.system-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.setting-item {
  flex: 1;
  min-width: 200px;
  background-color: #fafafa;
  padding: 10px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
}

.setting-name {
  font-weight: bold;
}

.log-entries {
  max-height: 300px;
  overflow-y: auto;
}

.log-entry {
  padding: 10px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  gap: 10px;
}

.timestamp {
  color: #888;
  min-width: 150px;
}

.log-level {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  min-width: 50px;
  text-align: center;
}

.log-level.info {
  background-color: #e6f7ff;
  color: #1890ff;
}

.log-level.warning {
  background-color: #fffbe6;
  color: #faad14;
}

.log-level.error {
  background-color: #fff1f0;
  color: #ff4d4f;
}

.log-message {
  flex: 1;
}

.log-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* 评分样式 */
.rating {
  display: inline-flex;
  align-items: center;
}

.star {
  color: #d9d9d9;
  font-size: 16px;
}

.star.filled {
  color: #faad14;
}

.rating-value {
  margin-left: 5px;
  color: #666;
}

/* tab切换内容区最小高度，平滑切换 */
.tab-content {
  min-height: 350px;
  transition: min-height 0.2s;
  padding: 0;
  margin: 0;
}

/* tab按钮下方间距 */
.tabs {
  margin-bottom: 16px;
}

/* 表格容器最小高度 */
.table-container {
  min-height: 200px;
}

/* loading和error始终占位，避免跳动 */
.loading, .error-message {
  min-height: 24px;
  display: flex;
  align-items: center;
}
